<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:s="http://jboss.org/seam/faces"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions"
      xml:lang="en" lang="en">

<ui:composition template="/resources/layout.xhtml">
    <ui:define name="title" >Пользователи системы</ui:define>
    <ui:define name="content">
        <h:panelGroup style="float: left; width: 200px;">
            <a4j:jsFunction name="renderReportList" render="reportList"/>
            <h:form>
                <h:dataTable value="#{reportAction.reportList}" var="report" id="reportList">
                    <h:column>
                        <h:panelGroup class="#{reportAction.isCurrentReport(report.reportId) ? 'active-report' : ''}">
                            <a4j:commandLink value="#{report.name}"
                                              action="#{reportAction.setCurrentReport(report)}"
                                              oncomplete="renderReportList();"
                                              render="reportContentParam, reportList"/>
                        </h:panelGroup>
                    </h:column>
                </h:dataTable>
            </h:form>
        </h:panelGroup>

        <h:panelGroup style="float: left; width: 600px;" id="reportContent">
            <h:panelGroup id="reportContentParam">
                <input type="button" onclick="runReport();" value="запустить"/>
            </h:panelGroup>
            <!--<a href="export?documentType=pdf" target="_blank">-->
                <!--<img src="resources/img/reports/export_to_pdf.png" alt="export_to_pdf" title="Экcпортировать в pdf"/>-->
            <!--</a>-->

            <!--<a href="export?documentType=xlsx" target="_blank">-->
                <!--<img src="resources/img/reports/export_to_xls.png" alt="export_to_xlsx" title="Экcпортировать в excel"/>-->
            <!--</a>-->

            <!--<a href="export?documentType=docx" target="_blank">-->
                <!--<img src="resources/img/reports/export_to_docx.png" alt="export_to_docx" title="Экcпортировать в word"/>-->
            <!--</a>-->

            <div id="reportContainer"></div>
        </h:panelGroup>
    </ui:define>
</ui:composition>

</html>
